import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';

// vant组件
import './plugins/vant';

// 样式
import 'amfe-flexible';
import './styles/index.scss';

Vue.config.productionTip = false;

// import VConsole from 'vconsole';
// new VConsole();

// 注册全局自定义指令
import * as directives from '@/directives';
Object.keys(directives).forEach(key => {
  Vue.directive(key, directives[key]);
});

// 处理权限问题
import checkBtnPermission from '@/utils/checkBtnPermission.js';
Vue.prototype.$checkBtnPermission = checkBtnPermission;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app');
